//
//  EDJSearchAddressTextField.m
//  edaijia
//
//  Created by 金 星 on 15/4/14.
//
//

#import "EDJSearchAddressTextField.h"

@implementation EDJSearchAddressTextField

- (CGRect)textRectForBounds:(CGRect)bounds {
    CGRect inset = CGRectMake(bounds.origin.x + self.leftView.right + 10, bounds.origin.y, bounds.size.width - self.leftView.right - 10, bounds.size.height);
    return inset;
}

- (CGRect)editingRectForBounds:(CGRect)bounds {
    CGRect inset = CGRectMake(bounds.origin.x + self.leftView.right + 10, bounds.origin.y, bounds.size.width - self.leftView.right - 10, bounds.size.height);
    return inset;
}

- (CGRect)leftViewRectForBounds:(CGRect)bounds {
    CGRect iconRect = [super leftViewRectForBounds:bounds];
    iconRect.origin.x += self.leftPadding;// 右偏10
    return iconRect;
}

- (CGRect)rightViewRectForBounds:(CGRect)bounds {
    CGRect iconRect = [super rightViewRectForBounds:bounds];
    iconRect.origin.x -= 10;// 左偏10
    return iconRect;
}

@end
